<template>
    <view id="switchAccount">
        <view class="user" v-for="(item,index) in user" :key="index" @click="switchUser(item)">
        	<!-- <image mode="aspectFill" class="img" :src="item.img"></image> -->
            <text class="name">{{item.org_name}}</text>
        </view>
        <!-- <view class="user user-add" @click="exit">
            <uni-icons type="plus" color="#666" size="30"></uni-icons>
            <text class="name">添加账号</text>
        </view> -->
    </view>
</template>
<script>
    import uniIcons from '@/components/uni-icons/uni-icons.vue'
    export default {
        name:'switchAccount',
        components: {
            uniIcons
        },
        data() {
            return {
                user:[],
            }
        },
        methods: {
            switchUser(item){

            },
            exit(){
                uni.navigateTo({
                    url: `/pages/home/login`
                })
            }
        },
        onLoad() {
            this.user=[...JSON.parse(uni.getStorageSync('_loginArr_'))];
        }
    }
</script>

<style lang="scss">
    #switchAccount {
        margin-top: 30rpx;
        .user{
            display: flex;
            align-items: center;
            padding: 20rpx;
            background: #fff;
            margin-top: 6rpx;
            .img{
                width: 80rpx;
                height: 80rpx;
                border: 2rpx solid transparent;
                border-radius: 50rpx;
            }
            .name{
                margin-left: 30rpx;
                overflow: hidden;
            }
        }
        .user-add{
            padding: 0;
            padding-left: 20rpx;
        }
    }
</style>
